<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CSafeSet&lt; Kt, Ft &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_c_safe_set-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CSafeSet&lt; Kt, Ft &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>线程安全的集合类  
 <a href="class_c_safe_set.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_safe_set_8h_source.html">SafeSet.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a5eac39761f068db3cb3de5adbb17d1bf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#a5eac39761f068db3cb3de5adbb17d1bf">Insert</a> (const Kt &amp;key)</td></tr>
<tr class="memdesc:a5eac39761f068db3cb3de5adbb17d1bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">插入一个元素  <a href="class_c_safe_set.html#a5eac39761f068db3cb3de5adbb17d1bf">更多...</a><br /></td></tr>
<tr class="separator:a5eac39761f068db3cb3de5adbb17d1bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a186f6ee5dbc0837992b68810d933494c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#a186f6ee5dbc0837992b68810d933494c">Erase</a> (const Kt &amp;key)</td></tr>
<tr class="memdesc:a186f6ee5dbc0837992b68810d933494c"><td class="mdescLeft">&#160;</td><td class="mdescRight">查找并返回结果值，之后在清除该元素  <a href="class_c_safe_set.html#a186f6ee5dbc0837992b68810d933494c">更多...</a><br /></td></tr>
<tr class="separator:a186f6ee5dbc0837992b68810d933494c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4a6e1f60961a16e39e5742e0feb3306"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#ae4a6e1f60961a16e39e5742e0feb3306">Find</a> (const Kt &amp;key)</td></tr>
<tr class="memdesc:ae4a6e1f60961a16e39e5742e0feb3306"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断键是否存在集合中  <a href="class_c_safe_set.html#ae4a6e1f60961a16e39e5742e0feb3306">更多...</a><br /></td></tr>
<tr class="separator:ae4a6e1f60961a16e39e5742e0feb3306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7af52d74336ec0f71efed1155757dd17"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#a7af52d74336ec0f71efed1155757dd17">Size</a> ()</td></tr>
<tr class="memdesc:a7af52d74336ec0f71efed1155757dd17"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回当前大小  <a href="class_c_safe_set.html#a7af52d74336ec0f71efed1155757dd17">更多...</a><br /></td></tr>
<tr class="separator:a7af52d74336ec0f71efed1155757dd17"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ab83a25871d5b7804164067d2621753c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_mutex.html">CMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#ab83a25871d5b7804164067d2621753c3">_mutexSet</a></td></tr>
<tr class="separator:ab83a25871d5b7804164067d2621753c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa17db95edba22e1378b27adca9ac103"><td class="memItemLeft" align="right" valign="top">std::set&lt; Kt, Ft &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_set.html#afa17db95edba22e1378b27adca9ac103">_setData</a></td></tr>
<tr class="separator:afa17db95edba22e1378b27adca9ac103"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;class Kt, class Ft = std::less&lt;Kt&gt;&gt;<br />
class CSafeSet&lt; Kt, Ft &gt;</h3>

<p>线程安全的集合类 </p>

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00012">12</a> 行定义.</p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a186f6ee5dbc0837992b68810d933494c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a186f6ee5dbc0837992b68810d933494c">&#9670;&nbsp;</a></span>Erase()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::Erase </td>
          <td>(</td>
          <td class="paramtype">const Kt &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>查找并返回结果值，之后在清除该元素 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>查找的键 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>如果存在该元素则返回true,不存在则返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00027">27</a> 行定义.</p>

</div>
</div>
<a id="ae4a6e1f60961a16e39e5742e0feb3306"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4a6e1f60961a16e39e5742e0feb3306">&#9670;&nbsp;</a></span>Find()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::Find </td>
          <td>(</td>
          <td class="paramtype">const Kt &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断键是否存在集合中 </p>

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00041">41</a> 行定义.</p>

</div>
</div>
<a id="a5eac39761f068db3cb3de5adbb17d1bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5eac39761f068db3cb3de5adbb17d1bf">&#9670;&nbsp;</a></span>Insert()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::Insert </td>
          <td>(</td>
          <td class="paramtype">const Kt &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>插入一个元素 </p>

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00016">16</a> 行定义.</p>

</div>
</div>
<a id="a7af52d74336ec0f71efed1155757dd17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7af52d74336ec0f71efed1155757dd17">&#9670;&nbsp;</a></span>Size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::Size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回当前大小 </p>

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="ab83a25871d5b7804164067d2621753c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab83a25871d5b7804164067d2621753c3">&#9670;&nbsp;</a></span>_mutexSet</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_mutex.html">CMutex</a> <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::_mutexSet</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00056">56</a> 行定义.</p>

</div>
</div>
<a id="afa17db95edba22e1378b27adca9ac103"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa17db95edba22e1378b27adca9ac103">&#9670;&nbsp;</a></span>_setData</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Kt , class Ft  = std::less&lt;Kt&gt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::set&lt;Kt, Ft&gt; <a class="el" href="class_c_safe_set.html">CSafeSet</a>&lt; Kt, Ft &gt;::_setData</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_safe_set_8h_source.html">SafeSet.h</a> 第 <a class="el" href="_safe_set_8h_source.html#l00057">57</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/algorithm/<a class="el" href="_safe_set_8h_source.html">SafeSet.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
